﻿using Mes.Domain.BoundedContext.Entities.Quality;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Mes.Infrastructure.Data.BoundedContext.EntityTypeConfigurations.Quality
{
    public class SamplePlanFreqLinkEntityConfig : IEntityTypeConfiguration<SamplePlanFreqLink>
    {
        public void Configure(EntityTypeBuilder<SamplePlanFreqLink> builder)
        {
            builder.ToTable("sample_plan_freq_link");
            builder.HasKey(e => new { e.Plan_Id, e.Freq_Id });
            builder.Property(e => e.Row_Id).IsRequired().UseIdentityColumn().HasIdentityOptions(startValue: 0, incrementBy: 1, minValue: 0);
        }
    }
}
